//
//  DatePickerController.m
//  O2O
//
//  Created by arron on 14/11/26.
//  Copyright (c) 2014年 arron. All rights reserved.
//

#import "DatePickerController.h"

@interface DatePickerController ()

@end

@implementation DatePickerController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    NSLocale * locale = [[NSLocale alloc] initWithLocaleIdentifier:@"Chinese"];
    [self.myDatePicker setLocale:locale];
    
}
- (IBAction)dateChanged:(UIDatePicker *)sender {
    
    UIDatePicker* control = (UIDatePicker*)sender;
    NSDate* _date = control.date;
    if (self.delegate!=nil&&[self.delegate respondsToSelector:@selector(setMySelectedDate:)]) {
        [self.delegate setMySelectedDate:_date];
    }
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
